<template>
  <div>
    <Home></Home>
    <span>{{$store.getters.getNum}}</span>

    <el-button @click="add1()">add 1</el-button>
  </div>
</template>

<script>
    import xin from "./xin";
    import Home from "./Home";

    export default {
        name: "test",
        components: {
            xin, Home
        },
        methods: {
            add1() {
                this.$store.commit('add1', 5)
            }
        },

    }
</script>
<style scoped>

</style>
